package com.ruoyi.market.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.market.domain.OrderDetail;
import com.ruoyi.market.mapper.OrderDetailMapper;
import com.ruoyi.market.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 *
 */
@Service
public class OrderDetailServiceImpl extends ServiceImpl<OrderDetailMapper, OrderDetail>
implements OrderDetailService {

    @Autowired
    OrderDetailMapper orderDetailMapper;

    @Override
    public boolean addDetails(List<OrderDetail> orderDetailList) {
        for (OrderDetail orderDetail : orderDetailList) {
            System.out.println(orderDetail);
        }
        return orderDetailMapper.addDetails(orderDetailList);
    }

    @Override
    public boolean deleteByMkOrderIndent(String mkOrderIndent) {
        return orderDetailMapper.deleteByMkOrderIndent(mkOrderIndent);
    }

    @Override
    public List<OrderDetail> getDetailListBymkOrderIndent(String mkOrderIndent) {
        return orderDetailMapper.getDetailListBymkOrderIndent(mkOrderIndent);
    }

    @Override
    public boolean modify(OrderDetail orderDetail) {
        return orderDetailMapper.modify(orderDetail);
    }

    @Override
    public OrderDetail getByProductId(OrderDetail orderDetail) {
        return orderDetailMapper.getByProductId(orderDetail);
    }
}




